package org.dolirio.soft.ui.components;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class MenuItem implements Serializable {

	private static final long serialVersionUID = 1L;

	private String label;
	private String url;
	private List<MenuItem> container;

	public MenuItem(String label, String url) {

		container = new ArrayList<MenuItem>();
		this.label = label;
		this.url = url;
	}

	public String getLabel() {
		return label;
	}

	public String getUrl() {
		return url;
	}

	public void setLabel(String label) {
		this.label = label;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public void addMenuItem(MenuItem item) {

		container.add(item);
	}

	public boolean isContainer() {

		return !container.isEmpty();
	}
}
